package com.shop.goods.domain;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.shop.common.annotation.Excel;
import com.shop.common.core.domain.BaseEntity;

import java.math.BigDecimal;

/**
 * 购物车数据对象 shop_cart
 *
 * @author wuhao
 * @date 2022-04-07
 */
public class ShopCart extends BaseEntity {
    private static final long serialVersionUID = 1L;
    /**
     * 商品图片
     */
    @Excel(name = "商品图片")
    private String image;

    /**
     * 商品名称
     */
    @Excel(name = "商品名称")
    private String goodsName;

    public String getImage() {
        return image;
    }

    public void setImage(String image) {
        this.image = image;
    }

    public String getGoodsName() {
        return goodsName;
    }

    public void setGoodsName(String goodsName) {
        this.goodsName = goodsName;
    }

    /**
     * 商品价格
     */
    @Excel(name = "商品价格")
    private BigDecimal goodsPrice;

    public BigDecimal getGoodsPrice() {
        return goodsPrice;
    }

    public void setGoodsPrice(BigDecimal goodsPrice) {
        this.goodsPrice = goodsPrice;
    }

    /**
     * 购物车id
     */
    private Long id;

    /**
     * 用户id
     */
    @Excel(name = "用户id")
    private Long userId;

    /**
     * 类型
     */
    @Excel(name = "类型")
    private String uid;

    /**
     * 商品id
     */
    @Excel(name = "商品id")
    private String goodsId;

    /**
     * 商品数量
     */
    @Excel(name = "商品数量")
    private Long goodsNum;

    public void setId(Long id) {
        this.id = id;
    }

    public Long getId() {
        return id;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUid(String uid) {
        this.uid = uid;
    }

    public String getUid() {
        return uid;
    }

    public void setGoodsId(String goodsId) {
        this.goodsId = goodsId;
    }

    public String getGoodsId() {
        return goodsId;
    }

    public void setGoodsNum(Long goodsNum) {
        this.goodsNum = goodsNum;
    }

    public Long getGoodsNum() {
        return goodsNum;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("userId", getUserId())
                .append("uid", getUid())
                .append("goodsId", getGoodsId())
                .append("goodsNum", getGoodsNum())
                .append("createTime", getCreateTime())
                .append("image", getImage())
                .append("goodsName", getGoodsName())
                .append("updateTime", getUpdateTime())
                .append("goodsPrice", getGoodsPrice())
                .toString();
    }
}
